﻿Imports tiendaRegalos

Public Class IngresarProductos
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btnGuardar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnGuardar.Click
        Try
            Dim negocio = New ProductoNegocio
            negocio.insertar(Me.txtNombre.Text, Me.txtStock.Text, Me.txtPrecio.Text, Me.txtDisponibilidad.Text)

            Me.txtNombre.Text = ""
            Me.txtStock.Text = ""
            Me.txtPrecio.Text = ""
            Me.txtDisponibilidad.Text = ""


            Response.Write("Se insertó correctamente")

        Catch ex As Exception
            Response.Write("Problemas al insertar")
        End Try
    End Sub

    
End Class